﻿@inherits System.Web.Mvc.WebViewPage

@{
    var pikapikaVersion = "Alpha";
    ViewBag.TitleFormat = ViewBag.TitleFormat ?? "{0} - PikaPika {1}";
    ViewBag.MobileMediaSelector = "handheld,only screen and (max-device-width:700px)";
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>@String.Format(ViewBag.TitleFormat, ViewBag.Title ?? "", pikapikaVersion)</title>
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
    @Html.Css("Site.css?20120305")
    @Html.Css("SiteMobile.css", (string)ViewBag.MobileMediaSelector)
    <!--[if !IE 7]>
        <style type="text/css">
            #wrap {display:table;height:100%}
        </style>
    <![endif]-->
    
    <!--[if lt IE 8]>
        <style type="text/css">
            #sidebar
            {
                margin-left: -300px;
            }
        </style>
    <![endif]-->
    @RenderSection("Head",required: false)
    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-19525559-1']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>
</head>

<body@{ if (!string.IsNullOrWhiteSpace(ViewBag.BodyClassName)) { WriteLiteral(string.Format(" class='{0}'", ViewBag.BodyClassName)); } }>
    <!--[if lt IE 8]>
        <div id="ie6-notice">
            您的IE娘太⑨了，笨蛋浏览器什么的最讨厌了！快快换上更聪明的<a href="http://www.microsoft.com/windows/internet-explorer/worldwide-sites.aspx">IE8娘</a>/<a href="http://www.mozilla.com/products/download.html">火狐娘</a>/<a href="http://www.google.com/chrome">Chrome娘</a>吧！
        </div>
    <![endif]-->
    <div id="wrap">
        <div id="page">

            <div id="header">
                <a id="title" href="@Url.Action("Index", "Home")">
                    &nbsp;
                    @*
                    <h1>PikaPika</h1> @pikapikaVersion
                    *@
                </a>
                <div id="menucontainer">

                    <ul id="menu">
                        @if (ViewBag.Publishers != null) {
                            <text>
                                <li>@Html.ActionLink("主页", "Index", "Home")</li>
                                <li>@Html.ActionLink("全部小说", "List", "Novel", new RouteValueDictionary { {"id", 0} }, null)</li>
                                @foreach (Publisher pub in ViewBag.Publishers) {
                                    <li>@Html.ActionLink(pub.Name, 
                                                         "List", 
                                                         "Novel", 
                                                         new RouteValueDictionary { 
                                                            {"id", pub.Id}, 
                                                            {"publisher", pub.Name} }, 
                                                         null)</li>
                                }
                            </text>
                        }
                    </ul>

                </div>
            </div>
            <div class="clear"></div>
            <div id="page-content">
                <div id="main-wrapper">
                    <div id="main">
                        @RenderBody()
                    </div>
                </div>
                <div id="sidebar">
                    @RenderSection("Sidebar",required: false)
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </div>
    <div id="footer">
        <div id="footer-info">
            PikaPika @pikapikaVersion | <a href="http://code.google.com/p/pikapika/issues/list" target="_blank">意见反馈</a> | <a href="https://pikapika.uservoice.com/forums/82401-general?lang=cn">新小说/新功能投票</a> | <a href="http://twitter.com/pikapika_novel" target="_blank">Twitter</a>
        </div>
        <div id="copyright">
            Copyright 2010 <a href="http://code.google.com/p/pikapika/" target="_blank">PikaPika Project</a>
        </div>
        <div id="execution-time">
            C: @ViewBag.ControllerExecutionTime.TotalMilliseconds.ToString("F0") ms, 
            V: @((DateTime.UtcNow - (DateTime)ViewBag.ResultExecutionStartTime).TotalMilliseconds.ToString("F0")) ms
        </div>
    </div>
</body>
</html>
